<?php
/**
 * 日期间隔
 */
$this->title = 'My Yii Application';
$css = <<<CSS
.sl{width:50px;display: inline-block;padding:6px 5px}
.sm{display: inline-block;width:10rem}
#result{margin-top: 10px}
CSS;

$this->registerCss($css);

$js = <<<JS
    $('#daydiff').click(function(){
        var ca=$('form').serialize();
        $.post('',ca,function(re){
            if (re.status==0){
                $('#result').html(re.data.code+' &nbsp;&nbsp;'+re.data.province+'&nbsp;&nbsp;'+re.data.city)
                
                $('#result').html(
                    '<table class="table table-bordered">'
                    +'<tr><th>车牌</th><td>'+re.data.number+'</td></tr>'
                    +'<tr><th>省份</th><td>'+re.data.province+'</td></tr>'
                    +'<tr><th>城市</th><td>'+re.data.city+'</td></tr>'
                    +'</table>'                    
                    )                  
            }else{
                $('#result').html(re.msg);
            }
        },'json');
        
    })
JS;
$this->registerJs($js);

?>

<div class="site-index">
    <div class="body-content">
        <h3>车牌归属查询</div>
    <hr/>
    <form class="form-inline">
        <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class=" col-xs-12 text-center ">
                <span>车牌号</span>
                <select id="c1" name="c1" class="form-control sl inline">
                    <option value='冀'>冀</option><option value='辽'>辽</option><option value='皖'>皖</option><option value='苏'>苏</option><option value='鄂'>鄂</option><option value='晋'>晋</option><option value='吉'>吉</option><option value='粤'>粤</option><option value='宁'>宁</option><option value='京'>京</option><option value='豫'>豫</option><option value='黑'>黑</option><option value='鲁'>鲁</option><option value='浙'>浙</option><option value='桂'>桂</option><option value='蒙'>蒙</option><option value='闽'>闽</option><option value='川'>川</option><option value='渝'>渝</option><option value='津'>津</option><option value='云'>云</option><option value='湘'>湘</option><option value='新'>新</option><option value='赣'>赣</option><option value='甘'>甘</option><option value='陕'>陕</option><option value='贵'>贵</option><option value='青'>青</option><option value='藏'>藏</option><option value='琼'>琼</option><option value='沪'>沪</option>
                </select>
                <select id="c2" name="c2" class="form-control sl inline">
                    <option value='A'>A</option><option value='B'>B</option><option value='C'>C</option><option value='D'>D</option><option value='E'>E</option><option value='F'>F</option><option value='G'>G</option><option value='H'>H</option><option value='J'>J</option><option value='R'>R</option><option value='S'>S</option><option value='T'>T</option><option value='K'>K</option><option value='L'>L</option><option value='M'>M</option><option value='N'>N</option><option value='P'>P</option><option value='Q'>Q</option><option value='U'>U</option><option value='V'>V</option><option value='W'>W</option><option value='X'>X</option><option value='Y'>Y</option><option value='Z'>Z</option>
                </select>
                <input id="sm" name="c3" type="text" class="form-control sm" placeholder="可选输入"/>
            </div>
        </div>
        <div class="col-xs-12 col-lg-12 col-md-12 text-center" style="margin-top: 4px">
            <a id="daydiff" class="btn btn-primary col-lg-4 col-xs-6" style="float: initial !important;">
                <i class="icon-chevron-down icon-white"></i>车牌查询</a>
        </div>
        <div class="col-xs-12 col-lg-12 col-md-12 text-center moreheight" id="result"
             style="height: 4rem;text-height:4rem"></div>
    </form>


</div>



